<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function moneySum() {
      let sum = +prompt('请输入银行卡余额:')
      let eat = +prompt('请输入当月食宿消费余额:')
      let live = +prompt('请输入当月生活消费余额:')
      let usum = sum - eat - live
      alert(`银行卡剩余金额为${usum}`)
    }
    let re = moneySum()
    console.log(re)  
  </script>
</body>
</html>